<!--
Date: 2025-08-13
Copyright (c) 2025 CAX Conversion Project
-->
<template>
  <div class="busines">
    <BusinessList v-if="showBusinessList" @handleEvent="handleEvent" />
    <AddBusiness v-if="showAddBusiness" @handleEvent="handleEvent" />
  </div>
</template>
<script setup name="BusinessManagement">
import BusinessList from './component/BusinessList.vue';
import AddBusiness from './component/AddBusiness.vue';
const showBusinessList = ref(true);
const showAddBusiness = ref(false);
const handleEvent = (data) => {
  if (data.component === 'busines') {
    showBusinessList.value = false;
    showAddBusiness.value = true;
  }
  if (data.component === 'addBusines') {
    showAddBusiness.value = false;
    showBusinessList.value = true;
  }
};
</script>
<style lang="scss" scoped>
.busines {
  height: calc(100vh - 84px);
  width: 100%;
}
</style>